import { createRouter,createWebHistory,RouteRecordRaw } from "vue-router";

const routes:Array<RouteRecordRaw>=[
    {
       path:"/",
        component:()=>import("../components/HelloWorld.vue")
    },
    {
        path:"/Demo",
         component:()=>import("../components/Demo.vue")
     },
     {
        path:"/Demo2",
         component:()=>import("../components/Demo2.vue")
     },
     {
        path:"/showStudentInfor",
         component:()=>import("../components/showStudentInfor.vue")
     },
     {
        path:"/stuContent",
         component:()=>import("../components/stuContent.vue")
     }
]
// createRouter:创建路由实例
// createWebHistory:创建WebHistory实例 路由历史记录
const routers=createRouter({
    history:createWebHistory(),
    routes
})
//导出路由实例
export default routers